package cn.zs.groupmarket.domain.activity.model.valobj;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @Description:
 * @Auther: zs
 * @Date: 2025/01/04/15:40
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum DiscountTypeEnum {
    BASE(0,"基础优惠"),
    TAG(1,"人群优惠");
    private Integer code;

    private String info;

    public static DiscountTypeEnum get(Integer code) {
        switch (code) {
            case 0:
                return BASE;
            case 1:
                return TAG;
            default:
                throw new RuntimeException("优惠类型不存在");
        }
    }


}
